import request from '@/utils/request'

// 查询列表
export function findAllMembers(query) {
    return request({
        url: '/api/members/list',
        method: 'post',
        data: query
    })
}
// 查询详情
export function getMembers(id) {
    return request({
        url: '/api/members/' + id,
        method: 'get'
    })
}

// 新增
export function addMembers(data) {
    return request({
        url: '/api/members/',
        method: 'post',
        data: data
    })
}

// 修改
export function updateMembers(id,data) {
    return request({
        url: '/api/members/update/'+id,
        method: 'put',
        data: data
    })
}

// 删除
export function delMembers(id) {
    return request({
      url: `/api/members/${id}/off`,
        method: 'DELETE'
    })
}

// 查询是否在申请
export function isApply(id) {
    return request({
      url: `/api/members/isApply`,
        method: 'get'
    })
}